package com.zhong.gang.app.ui.main;

import android.content.Context;
import com.zhong.gang.app.api.Api;
import com.zhong.gang.app.api.HttpUtils;
import com.zhong.gang.applib.http.callback.Callback;

public class MainPresenter {

    public void getList(Context context, int page, String searchKey,int type, int orderStatus, Callback callback){
        HttpUtils.get(Api.orderList,context)
                .addParams("current",page+"")
                .addParams("size","10")
                .addParams("searchKey",searchKey)
                .addParams("type",type+"")
                .addParams("orderStatus",orderStatus+"")
                .build().execute(callback);

    }

    /**
     * 获取未读信息数
     * @param context
     * @param callback
     */
    public void getMsgUnReadCount(Context context,Callback callback){
        HttpUtils.get(Api.getunReadCount,context)
                .build().execute(callback);
    }

}
